<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ attribute name="title" required="true"%>
<%@ attribute name="scripts" fragment="true"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Three2Learn - ${title}</title>
<link href="<c:url value="/resources/css/main.css"/>" rel="stylesheet"
	type="text/css">
</head>
<body>
	<div id="container">
		<header id="header">
			<a class="logo" href="<c:url value="/" />"></a>
			<form method="get" action="" id="change-language-form">
				<label for="lang"><spring:message code="label.language" /></label> <select
					name="lang">
					<option value="">
						<spring:message code="placeholder.select_language" />
					</option>
					<option value="en">English</option>
					<option value="nl">Dutch</option>
				</select>
				<button type="submit">
					<spring:message code="button.change" />
				</button>
			</form>
		</header>
		<div id="navigation-menu">
			<ul>
				<li><a href="<c:url value="/" />"><spring:message
							code="navigation.home" /></a></li>
				<c:choose>
					<c:when test="${!isLoggedIn}">
						<li><a href="<c:url value="/register_user" />"><spring:message
									code="navigation.register" /></a></li>
					</c:when>
				</c:choose>
				<li><a href="<c:url value="/category/overview" />"><spring:message
							code="navigation.courses" /></a></li>
				<li><a href="#"><spring:message code="navigation.about" /></a></li>
			</ul>
			<form method="post" action="<c:url value="/search"/>" id="search-bar">
				<input type="text" id="search" name="query"
					placeholder="<spring:message code="placeholder.search"/>">
				<button type="submit">
					<spring:message code="button.search" />
				</button>
			</form>
		</div>
		<div id="content">
			<jsp:doBody />
		</div>
		<footer id="footer"> ${serverTime} </footer>
	</div>
	<jsp:invoke fragment="scripts" />
</body>
</html>
